package Test1225;

public class Test03 {
        public static void main(String[] args) {

            // 找出最大值的下标
            int[] arr = {5, 8, 3, 7, 6, 9};
            int index = m03(arr);
            System.out.println(index);

        }
    public static int m03(int[] arr) {
            int max=0;
            int max1=arr[0];
            for(int i=0;i<arr.length;i++) {
                if (arr[i]>max1){
                    max1=arr[i];
                    max=i;
                }
            }return max;
    }

}
